package com.ssy.lingxi.contract.entity;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 合同付款计划
 * @author 伍将
 * @date 2021/1/25
 * @version 2.0.0
 */
@Entity
@Table(schema = "public", name = "con_contract_pay_plan",
        indexes = {@Index(name = "con_contract_pay_plan_contract_id_idx", columnList = "contractId")})
public class ContractPayPlanDO implements Serializable {
    private static final long serialVersionUID = 8961079518409256786L;

    /**
     * ID
     */
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "contract_pay_plan_seq")
    @SequenceGenerator(sequenceName = "con_contract_pay_plan_seq", name = "contract_pay_plan_seq", allocationSize = 1)
    private Long id;

    /**
     * 合同id
     */
    @Column(columnDefinition = "int8")
    private Long contractId;

    /**
     * 付款次数
     */
    @Column(columnDefinition = "int")
    private Integer payNum;

    /**
     * 付款阶段
     */
    @Column(columnDefinition = "varchar(300)")
    private String payStage;

    /**
     * 预计付款时间
     */
    @Column(columnDefinition = "int8")
    private Long expectPayTime;

    /**
     * 付款比率
     */
    @Column(columnDefinition = "decimal")
    private Double payRatio;

    /**
     * 付款金额
     */
    @Column(columnDefinition = "decimal")
    private Double payAmount;

    /**
     * 付款方式：ContractPayWayEnum
     */
    @Column(columnDefinition = "int")
    private Integer payWay;

    /**
     * 付款参数（账期天数/请款日）
     */
    @Column(columnDefinition = "int")
    private Integer payParam;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getContractId() {
        return contractId;
    }

    public void setContractId(Long contractId) {
        this.contractId = contractId;
    }

    public Integer getPayNum() {
        return payNum;
    }

    public void setPayNum(Integer payNum) {
        this.payNum = payNum;
    }

    public String getPayStage() {
        return payStage;
    }

    public void setPayStage(String payStage) {
        this.payStage = payStage;
    }

    public Long getExpectPayTime() {
        return expectPayTime;
    }

    public void setExpectPayTime(Long expectPayTime) {
        this.expectPayTime = expectPayTime;
    }

    public Double getPayRatio() {
        return payRatio;
    }

    public void setPayRatio(Double payRatio) {
        this.payRatio = payRatio;
    }

    public Double getPayAmount() {
        return payAmount;
    }

    public void setPayAmount(Double payAmount) {
        this.payAmount = payAmount;
    }

    public Integer getPayWay() {
        return payWay;
    }

    public void setPayWay(Integer payWay) {
        this.payWay = payWay;
    }

    public Integer getPayParam() {
        return payParam;
    }

    public void setPayParam(Integer payParam) {
        this.payParam = payParam;
    }
}
